﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
	<Style x:Key="EstiloDeFoco" TargetType="{x:Type ListBoxItem}">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
		<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
		<Setter Property="Padding" Value="2,0,0,0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ListBoxItem}">
					<Border x:Name="Bd" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
						<Border.BorderBrush>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="Black" Offset="0"/>
								<GradientStop Color="#FFFFB700" Offset="1"/>
							</LinearGradientBrush>
						</Border.BorderBrush>
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
					</Border>
					<ControlTemplate.Triggers>
						<EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
						<Trigger Property="IsSelected" Value="true">
							<Setter Property="Background" TargetName="Bd">
								<Setter.Value>
									<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
										<GradientStop Color="#FFFEFBF4" Offset="0"/>
										<GradientStop Color="#FFFDE7CE" Offset="0.19"/>
										<GradientStop Color="#FFFDDEB8" Offset="0.39"/>
										<GradientStop Color="#FFFFCE6B" Offset="0.39"/>
										<GradientStop Color="#FFFFDE9A" Offset="0.79"/>
										<GradientStop Color="#FFFFEBAA" Offset="1"/>
									</LinearGradientBrush>
								</Setter.Value>
							</Setter>
							<Setter Property="BorderBrush" TargetName="Bd" Value="#FFFFB700"/>
						</Trigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsSelected" Value="true"/>
								<Condition Property="Selector.IsSelectionActive" Value="false"/>
							</MultiTrigger.Conditions>
                            <Setter Property="Background" TargetName="Bd">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#FFFEFBF4" Offset="0"/>
                                        <GradientStop Color="#FFFDE7CE" Offset="0.19"/>
                                        <GradientStop Color="#FFFDDEB8" Offset="0.39"/>
                                        <GradientStop Color="#FFFFCE6B" Offset="0.39"/>
                                        <GradientStop Color="#FFFFDE9A" Offset="0.79"/>
                                        <GradientStop Color="#FFFFEBAA" Offset="1"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
						</MultiTrigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" TargetName="Bd">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#FFFEFBF4" Offset="0"/>
                                        <GradientStop Color="#FFFDE7CE" Offset="0.19"/>
                                        <GradientStop Color="#FFFDDEB8" Offset="0.39"/>
                                        <GradientStop Color="#FFFFCE6B" Offset="0.39"/>
                                        <GradientStop Color="#FFFFDE9A" Offset="0.79"/>
                                        <GradientStop Color="#FFFFEBAA" Offset="1"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="BorderBrush" TargetName="Bd" Value="#FFFFB700"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="Selector.IsSelected" Value="False"/>
		</Style.Triggers>
	</Style>
    <Style x:Key="LegendStyle" TargetType="{x:Type Control}">
        <Setter Property="Template" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
    </Style>
    <Style x:Key="PrettierDataGridStyle" TargetType="{x:Type DataGrid}">
        <Setter Property="RowStyle">
            <Setter.Value>
                <Style TargetType="{x:Type DataGridRow}">
                    <Style.Triggers>
                        <!-- Highlight a grid row as the mouse passes over -->
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" >
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#FFFEFBF4" Offset="0"/>
                                        <GradientStop Color="#FFFDE7CE" Offset="0.19"/>
                                        <GradientStop Color="#FFFDDEB8" Offset="0.39"/>
                                        <GradientStop Color="#FFFFCE6B" Offset="0.39"/>
                                        <GradientStop Color="#FFFFDE9A" Offset="0.79"/>
                                        <GradientStop Color="#FFFFEBAA" Offset="1"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                           
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="CellStyle">
            <Setter.Value>
                <Style TargetType="{x:Type DataGridCell}">

                    <!-- Add some padding around the contents of a cell -->
                    <Setter Property="Padding" Value="4,3,4,3" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type DataGridCell}">
                                <Border Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}">
                                    <ContentPresenter />
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                    <Style.Triggers>
                        <!-- Highlight selected rows -->
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Background" Value="Lavender" />
                            <Setter Property="BorderBrush" Value="Lavender" />
                            <Setter Property="Foreground" Value="Black" />
                        </Trigger>
                    </Style.Triggers>

                </Style>
            </Setter.Value>
        </Setter>

    </Style>
	<Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<Border Padding="{TemplateBinding Padding}">
						<Grid Background="Transparent" SnapsToDevicePixels="False">
							<Grid.RowDefinitions>
								<RowDefinition Height="19"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
							<Grid>
								<Grid.LayoutTransform>
									<TransformGroup>
										<TransformGroup.Children>
											<TransformCollection>
												<RotateTransform Angle="-90"/>
											</TransformCollection>
										</TransformGroup.Children>
									</TransformGroup>
								</Grid.LayoutTransform>
								<Ellipse x:Name="circle" HorizontalAlignment="Center" Height="19" Stroke="DarkGray" VerticalAlignment="Center" Width="19"/>
								<Path x:Name="arrow" Data="M 1,1.5 L 4.5,5 L 8,1.5" HorizontalAlignment="Center" SnapsToDevicePixels="false" Stroke="#666" StrokeThickness="2" VerticalAlignment="Center"/>
							</Grid>
							<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" Grid.Row="1" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Top"/>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="true">
							<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
							<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<Border Padding="{TemplateBinding Padding}">
						<Grid Background="Transparent" SnapsToDevicePixels="False">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="19"/>
								<ColumnDefinition Width="*"/>
							</Grid.ColumnDefinitions>
							<Grid>
								<Grid.LayoutTransform>
									<TransformGroup>
										<TransformGroup.Children>
											<TransformCollection>
												<RotateTransform Angle="180"/>
											</TransformCollection>
										</TransformGroup.Children>
									</TransformGroup>
								</Grid.LayoutTransform>
								<Ellipse x:Name="circle" HorizontalAlignment="Center" Height="19" Stroke="DarkGray" VerticalAlignment="Center" Width="19"/>
								<Path x:Name="arrow" Data="M 1,1.5 L 4.5,5 L 8,1.5" HorizontalAlignment="Center" SnapsToDevicePixels="false" Stroke="#666" StrokeThickness="2" VerticalAlignment="Center"/>
							</Grid>
							<ContentPresenter Grid.Column="1" HorizontalAlignment="Left" Margin="4,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Center"/>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="true">
							<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
							<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<Border Padding="{TemplateBinding Padding}">
						<Grid Background="Transparent" SnapsToDevicePixels="False">
							<Grid.RowDefinitions>
								<RowDefinition Height="19"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
							<Grid>
								<Grid.LayoutTransform>
									<TransformGroup>
										<TransformGroup.Children>
											<TransformCollection>
												<RotateTransform Angle="90"/>
											</TransformCollection>
										</TransformGroup.Children>
									</TransformGroup>
								</Grid.LayoutTransform>
								<Ellipse x:Name="circle" HorizontalAlignment="Center" Height="19" Stroke="DarkGray" VerticalAlignment="Center" Width="19"/>
								<Path x:Name="arrow" Data="M 1,1.5 L 4.5,5 L 8,1.5" HorizontalAlignment="Center" SnapsToDevicePixels="false" Stroke="#666" StrokeThickness="2" VerticalAlignment="Center"/>
							</Grid>
							<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" Grid.Row="1" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Top"/>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="true">
							<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
							<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ExpanderHeaderFocusVisual">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Border>
						<Rectangle Margin="0" SnapsToDevicePixels="true" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2"/>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<Border Padding="{TemplateBinding Padding}">
						<Grid Background="Transparent" SnapsToDevicePixels="False">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="19"/>
								<ColumnDefinition Width="*"/>
							</Grid.ColumnDefinitions>
							<Ellipse x:Name="circle" HorizontalAlignment="Center" Height="19" Stroke="DarkGray" VerticalAlignment="Center" Width="19"/>
							<Path x:Name="arrow" Data="M 1,1.5 L 4.5,5 L 8,1.5" HorizontalAlignment="Center" SnapsToDevicePixels="false" Stroke="#666" StrokeThickness="2" VerticalAlignment="Center"/>
							<ContentPresenter Grid.Column="1" HorizontalAlignment="Left" Margin="4,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Center"/>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="true">
							<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
							<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ExpanderStyleNando" TargetType="{x:Type Expander}">
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
		<Setter Property="BorderBrush" Value="Transparent"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Expander}">
					<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3" SnapsToDevicePixels="true">
						<DockPanel>
							<ToggleButton x:Name="HeaderSite" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" Content="{TemplateBinding Header}" DockPanel.Dock="Top" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" MinWidth="0" MinHeight="0" Padding="{TemplateBinding Padding}" Style="{StaticResource ExpanderDownHeaderStyle}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
							<ContentPresenter x:Name="ExpandSite" DockPanel.Dock="Bottom" Focusable="false" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
						</DockPanel>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsExpanded" Value="true">
							<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible"/>
						</Trigger>
						<Trigger Property="ExpandDirection" Value="Right">
							<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right"/>
							<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left"/>
							<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderStyle}"/>
						</Trigger>
						<Trigger Property="ExpandDirection" Value="Up">
							<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top"/>
							<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom"/>
							<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderStyle}"/>
						</Trigger>
						<Trigger Property="ExpandDirection" Value="Left">
							<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left"/>
							<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right"/>
							<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderStyle}"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ButtonFocusVisual">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#F3F3F3" Offset="0"/>
		<GradientStop Color="#EBEBEB" Offset="0.5"/>
		<GradientStop Color="#DDDDDD" Offset="0.5"/>
		<GradientStop Color="#CDCDCD" Offset="1"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
	<Style x:Key="ButtonStyleNando" TargetType="{x:Type Button}">
		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
		<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="1"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" Background="{TemplateBinding Background}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderDefaulted="{TemplateBinding IsDefaulted}" SnapsToDevicePixels="true">
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
					</Microsoft_Windows_Themes:ButtonChrome>
					<ControlTemplate.Triggers>
						<Trigger Property="IsKeyboardFocused" Value="true">
							<Setter Property="RenderDefaulted" TargetName="Chrome" Value="true"/>
						</Trigger>
						<Trigger Property="ToggleButton.IsChecked" Value="true">
							<Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="#ADADAD"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/>
	<Style x:Key="TabControlOutlookStyle" TargetType="{x:Type TabControl}">
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="Padding" Value="4,4,4,4"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
		<Setter Property="Background" Value="#F9F9F9"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabControl}">
					<Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
						<Grid.ColumnDefinitions>
							<ColumnDefinition x:Name="ColumnDefinition0"/>
							<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
							<RowDefinition x:Name="RowDefinition1" Height="*"/>
						</Grid.RowDefinitions>
						<StackPanel x:Name="HeaderPanel" Grid.Column="0" IsItemsHost="true" Margin="2,2,2,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
						<Border x:Name="ContentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
							<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="TabStripPlacement" Value="Bottom">
							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1"/>
							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
							<Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2"/>
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Left">
							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0"/>
							<Setter Property="Grid.Column" TargetName="ContentPanel" Value="1"/>
							<Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto"/>
							<Setter Property="Width" TargetName="ColumnDefinition1" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
							<Setter Property="Margin" TargetName="HeaderPanel" Value="2,2,0,2"/>
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Right">
							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1"/>
							<Setter Property="Grid.Column" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Width" TargetName="ColumnDefinition0" Value="*"/>
							<Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto"/>
							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
							<Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>